var express = require('express');
var router = express.Router();

const shelves = require("../controller/shelves");
const auth = require("../controller/auth");

router.all("*",auth.isLogin, auth.isAdmin);
//查询货架上的货物数量列表
router.get("/findItemCount", shelves.findAllWithPagination);
//查询货架数量
router.get("/count",shelves.getCount);
//修改货架
router.put("/:id", shelves.update);
//增加货架
router.post("/", shelves.add);
//查找指定id货架
router.get("/:id", shelves.find);
//删除货架
router.delete("/:id", shelves.remove);
//查询货架列表
router.get("/",shelves.findAll);


module.exports = router;